// AlarmDataPanel.cpp : implementation file
//

#include "stdafx.h"
#include "kwclientcore.h"
#include "AlarmDataPanel.h"
#include "AlarmDataSurface.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAlarmDataPanel

CAlarmDataPanel::CAlarmDataPanel()
{
  m_nPanelType = PT_ALARMDATA;
  m_nCoalMineId = 0;
  m_strMonUnitId = "";
  m_ColorScheme.m_crCaption = RGB(127, 32, 32);
  m_ColorScheme.m_crGradientCaption = RGB(255, 160, 160);
  m_ColorScheme.m_nActiveLabelBmpId = IDB_BITMAP_SELECTEDREDLABEL;
  m_ColorScheme.m_nInactiveLabelBmpId = IDB_BITMAP_UNSELECTEDREDLABEL;
}

CAlarmDataPanel::~CAlarmDataPanel()
{
}


BEGIN_MESSAGE_MAP(CAlarmDataPanel, CBasePanel)
	//{{AFX_MSG_MAP(CAlarmDataPanel)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// CAlarmDataPanel message handlers

void CAlarmDataPanel::CreateSurfaces()
{
  bool bSuccess;

  CAlarmDataSurface * pAlarmDataSurface = new CAlarmDataSurface(this);
  bSuccess = pAlarmDataSurface->Create(this);
  ASSERT(bSuccess);
  AddSurface(pAlarmDataSurface);

  ActivateSurface(pAlarmDataSurface);
}

void CAlarmDataPanel::Paint(CDC& dc)
{

}

void CAlarmDataPanel::GetMinMaxInfo(MINMAXINFO FAR* lpMMI)
{
  CPoint sizeScreen(GetSystemMetrics(SM_CXFULLSCREEN), GetSystemMetrics(SM_CYFULLSCREEN)+GetSystemMetrics(SM_CYCAPTION));
  CPoint sizeFrame(GetSystemMetrics(SM_CXSIZEFRAME), GetSystemMetrics(SM_CYSIZEFRAME));
  lpMMI->ptMaxSize = CPoint(sizeScreen.x+sizeFrame.x*2, sizeScreen.y+sizeFrame.y*2);
  lpMMI->ptMaxTrackSize = lpMMI->ptMaxSize;
  lpMMI->ptMinTrackSize = CPoint(460, 200);
}
